/* lcn/include/lcnd/lcn.h 
 * 
 * This file is part of lcnd. 
 * 
 * lcnd is free software: you can redistribute it and/or modify 
 * it under the terms of the GNU General Public License as published by 
 * the Free Software Foundation, either version 3 of the License, or 
 * (at your option) any later version. 
 * 
 * lcnd is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 * GNU General Public License for more details. 
 * 
 * You should have received a copy of the GNU General Public License 
 * along with lcnd. If not, see <https://www.gnu.org/licenses/>
 */ 



#ifndef __LCN_LCN_H
#define __LCN_LCN_H

#include <sys/types.h>
#include <stdlib.h>
#include <errno.h>
#include <klist.h>

#define LCND_PORT 		427

struct connection {
	int 			fd;
	struct klist_node 	node;
};

#define connection_init(c) 

#define amalloc(nbytes) 	malloc(nbytes)
#define afree(p, nbytes) 	free(p)

#define toboolean(c) 		!!(c)
#define likely(c) 		__builtin_expect(toboolean(c), 1)
#define unlikely(c) 		__builtin_expect(toboolean(c), 0)

#endif

